package com.sk.cardeal.utils;


import android.app.Activity;
import android.util.Log;

import com.alibaba.fastjson.JSON;
import com.sk.cardeal.entity.InSaveEntity;
import com.sk.cardeal.entity.NewPartsParam;
import com.sk.cardeal.entity.OutListParams;
import com.sk.cardeal.entity.OutOrInEntity;
import com.sk.cardeal.entity.OutSaveEntity;
import com.sk.cardeal.entity.PayEntity;
import com.sk.cardeal.entity.PostIn;
import com.sk.cardeal.entity.SaveGetCarBean;
import com.sk.cardeal.callback.HandleDataCallBack;
import com.sk.cardeal.entity.ApplyFormEntity;
import com.sk.cardeal.entity.NewCustomEntity;
import com.sk.cardeal.entity.NewFixProject;
import com.sk.cardeal.entity.NewIOrderEntity;
import com.sk.cardeal.entity.PartsSelectEntity;
import com.sk.cardeal.entity.SaveApplyBean;
import com.sk.cardeal.entity.SpecialEntity;

import java.util.LinkedHashMap;

public class AppApi {

    //接车工单
    public static void saveGetCar(SaveGetCarBean bean, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", bean);
        HttpUtils.postJSONData(HttpAddress.SaveGetCar, map, callBack, tag, activity);
    }

    //获取车辆品牌列表
    public static void getCarBrand(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.getData(HttpAddress.GetCarBrand, map, callBack, tag, activity);
    }

    //获取品牌型号
    public static void getCarModel(String seriesId, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("seriesId", seriesId);
        HttpUtils.patchData(HttpAddress.GetCarModel, map, callBack, tag, activity);
    }

    //获取品牌型号
    public static void getCarSeries(String brandId, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("brandId", brandId);
        HttpUtils.patchData(HttpAddress.GetCarSeries, map, callBack, tag, activity);
    }

    //获取汽修员工列表
    public static void getCompanyWorker(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId ", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.GetCompanyWorkerList, map, callBack, tag, activity);
    }

    //获取分类
    public static void getPartsKind(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.getData(HttpAddress.GetPartsKind, map, callBack, tag, activity);
    }

    //获取配件列表
    public static void getPartsList(PartsSelectEntity partsSelectEntity, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", partsSelectEntity);
        HttpUtils.postJSONData(HttpAddress.GetPartsList, map, callBack, tag, activity);
    }

    //获取配件品牌列表
    public static void getPartsBrand(String typeId, String categoryId, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("typeId", typeId);
        map.put("categoryId ", categoryId);
        HttpUtils.patchData(HttpAddress.GetPartsBrand, map, callBack, tag, activity);
    }

    //根据公司id获取项目
    public static void getFixProject(int type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("groupId", "402880eb60d8b87a0160d8bb2c450001");
        map.put("type", type);
        HttpUtils.patchData(HttpAddress.GetFixProject, map, callBack, tag, activity);
    }

    //加载工位
    public static void getWorkPostion(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.GetWorkPostion, map, callBack, tag, activity);
    }

    //加载工单列表
    public static void getWorkFormList(String state, int pageType, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        map.put("technicianId", "");
        map.put("pageType", pageType);
        map.put("page", page);
        map.put("state", state);
        HttpUtils.patchData(HttpAddress.GetWorkFormList, map, callBack, tag, activity);
    }

    //加载所有维修类型
    public static void getFixType(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.patchData(HttpAddress.GetFixType, map, callBack, tag, activity);
    }

    //保存工单
    public static void saveForm(ApplyFormEntity applyFormEntity, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", applyFormEntity);
        HttpUtils.postJSONData(HttpAddress.SaveForm, map, callBack, tag, activity);
    }

    //提交工单
    public static void submitForm(ApplyFormEntity applyFormEntity, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", applyFormEntity);
        Log.v("submitForm", JSON.toJSONString(applyFormEntity));
        HttpUtils.postJSONData(HttpAddress.SubmitForm, map, callBack, tag, activity);
    }

    //获取技师列表
    public static void getTechnicianList(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.GetTechnician, map, callBack, tag, activity);
    }

    //工单信息
    public static void workFormDetails(String id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("id", id);
        HttpUtils.patchData(HttpAddress.WorkFromDetails, map, callBack, tag, activity);
    }

    //预约工单信息
    public static void getOrderList(String cardNumber, int state, String isNow, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("cardNumber", cardNumber);
        map.put("state", state);
        map.put("shopId", MyUtils.getUser(activity).getCompanyId());
        map.put("isNow", isNow);
        map.put("page", page);
        HttpUtils.patchData(HttpAddress.GetOrderList, map, callBack, tag, activity);
    }

    //获取客户列表
    public static void getCustomList(int type, int page, String param, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("type", type);
        map.put("page", page);
        map.put("param", param);
        HttpUtils.patchData(HttpAddress.GetCustomList, map, callBack, tag, activity);
    }

    //加载当日数据
    public static void getToadyData(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.GetToadyData, map, callBack, tag, activity);
    }

    //加载当日列表
    public static void getTodayListData(int type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("type", type);
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.GetToadyListData, map, callBack, tag, activity);
    }

    //加载申领
    public static void getApplyList(int type, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        map.put("userId", MyUtils.getUser(activity).getId());
        map.put("type", type);
        map.put("page", page);
        HttpUtils.patchData(HttpAddress.ApplyList, map, callBack, tag, activity);
    }

    //申领保存操作
    public static void saveApply(SaveApplyBean saveApplyBean, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", saveApplyBean);
        HttpUtils.postJSONData(HttpAddress.SaveApply, map, callBack, tag, activity);
    }

    //加载申领库存
    public static void getApplyPartInfo(int type, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        map.put("type", type);
        map.put("page", page);
        HttpUtils.patchData(HttpAddress.ApplyStock, map, callBack, tag, activity);
    }


    //加载申领详情
    public static void getApplyDetails(String id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("id", id);
        HttpUtils.patchData(HttpAddress.ApplyDetails, map, callBack, tag, activity);
    }

    //新建客户
    public static void insertCustom(NewCustomEntity newCustomEntity, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", newCustomEntity);
        HttpUtils.postJSONData(HttpAddress.AddNewCustom, map, callBack, tag, activity);
    }

    //新建预约单
    public static void addNewOrder(NewIOrderEntity newIOrderEntity, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", newIOrderEntity);
        HttpUtils.postJSONData(HttpAddress.AddNewOrder, map, callBack, tag, activity);
    }

    //预约详情
    public static void orderDetails(String conventionId, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("conventionId", conventionId);
        HttpUtils.patchData(HttpAddress.AddNewOrder, map, callBack, tag, activity);
    }

    //修改预约单状态
    public static void changeOrderState(String id, int state, String conventionTime, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("id", id);
        map.put("state", state);
        map.put("conventionTime", conventionTime);
        HttpUtils.patchData(HttpAddress.ChangeOrderState, map, callBack, tag, activity);
    }


    //新增维修项目
    public static void newFixProject(NewFixProject newFixProject, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", newFixProject);
        HttpUtils.postJSONData(HttpAddress.AddNewProject, map, callBack, tag, activity);
    }

    //获取营业报表
    public static void bussinessStatement(String reportDate, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        map.put("reportDate", reportDate);
        HttpUtils.patchData(HttpAddress.BusinessStatement, map, callBack, tag, activity);
    }

    //派单
    public static void doActionOnForm(String id, String placeId, String technicianId, String state, String code, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("id", id);
        map.put("placeId", placeId);
        map.put("technicianId", technicianId);
        map.put("state", state);
        map.put("code", code);
        HttpUtils.patchData(HttpAddress.DoActionOnForm, map, callBack, tag, activity);
    }


    //修改项目信息
    public static void updateProjectInfo(ApplyFormEntity applyFormEntity, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", applyFormEntity);
        HttpUtils.postJSONData(HttpAddress.UpDateOtherInfo, map, callBack, tag, activity);
    }


    //顾客详情
    public static void customDetails(String id, String plateNumber, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("id", id);
        map.put("plateNumber", plateNumber);
        HttpUtils.patchData(HttpAddress.CustomDetails, map, callBack, tag, activity);
    }

    //
    public static void customDetails(String plateNumber, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("plateNumber", plateNumber);
        HttpUtils.patchData(HttpAddress.GetInfoById, map, callBack, tag, activity);
    }

    //登录
    public static void loginAccount(String loginName, String pwd, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("loginName", loginName);
        map.put("pwd", pwd);
        HttpUtils.patchData(HttpAddress.LoginAccount, map, callBack, tag, activity);
    }

    //获取数据字典
    public static void getAllDataDictionary(String code, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("code", code);
        HttpUtils.patchData(HttpAddress.GetAllDataDictionary, map, callBack, tag, activity);
    }

    //获取保险公司
    public static void getAllCompany(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.patchData(HttpAddress.GetAllCompany, map, callBack, tag, activity);
    }

    //获取所有车辆类型
    public static void getAllCarTypes(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("code", "CX");
        HttpUtils.patchData(HttpAddress.GetAllDataDictionary, map, callBack, tag, activity);
    }

    //获取首页数量
    public static void getHomeDataCount(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.GetHomeData, map, callBack, tag, activity);
    }

    //常见问题
    public static void getNormalProblems(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.patchData(HttpAddress.GetNormalProblems, map, callBack, tag, activity);
    }

    //问题详情
    public static void getProblemDetails(String id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("id", id);
        HttpUtils.patchData(HttpAddress.GetProblemDetails, map, callBack, tag, activity);
    }

    //维修保养信息
    public static void getMaintainInfo(String carId, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("carId", carId);
        map.put("page", 0);
        HttpUtils.patchData(HttpAddress.GetMainInfo, map, callBack, tag, activity);
    }

    //资讯推荐
    public static void getConsultList(String userId, int type, String messageId, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("userId", userId);
        map.put("type", type);
        map.put("messageId", messageId);
        map.put("page", page);
        HttpUtils.patchData(HttpAddress.ConsultRecommend, map, callBack, tag, activity);
    }

    //入库单列表
    public static void getInOrderList(PostIn postIn, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", postIn);
        HttpUtils.postJSONData(HttpAddress.InListData, map, callBack, tag, activity);
    }

    //入库单详情
    public static void inOrderDetails(String mainId, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("mainId", mainId);
        HttpUtils.patchData(HttpAddress.InOrderDetails, map, callBack, tag, activity);
    }

    //仓库列表
    public static void warehourseList(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId_topId", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.WarehouseList, map, callBack, tag, activity);
    }

    //库位列表
    public static void warehourseSeatList(String carWarehouseid, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("carWarehouseid", carWarehouseid);
        HttpUtils.patchData(HttpAddress.WarehouseSeatList, map, callBack, tag, activity);
    }

    //配件详情
    public static void partsDeails(String type, String goodsCode, String lackpurchaseId, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("type", type);
        map.put("goodsCode", goodsCode);
        map.put("lackpurchaseId", lackpurchaseId);
        HttpUtils.patchData(HttpAddress.GetPastsDetails, map, callBack, tag, activity);
    }

    //获取新得配件列表
    public static void getNewPartsList(NewPartsParam newPartsParam, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", newPartsParam);
        HttpUtils.postJSONData(HttpAddress.GetNewParts, map, callBack, tag, activity);
    }

    //获取出库单列表
    public static void getOutList(OutListParams outListParams, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", outListParams);
        HttpUtils.postJSONData(HttpAddress.GetOutList, map, callBack, tag, activity);
    }

    //获取出库单详情
    public static void getOutOrderDetails(String orderid, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("orderid", orderid);
        HttpUtils.patchData(HttpAddress.OutOrderDetails, map, callBack, tag, activity);
    }

    //出库保存
    public static void outListSave(OutSaveEntity outSaveEntity, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", outSaveEntity);
        HttpUtils.postJSONData(HttpAddress.OutListSave, map, callBack, tag, activity);
    }

    //入库保存
    public static void inListSave(InSaveEntity inSaveEntity, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", inSaveEntity);
        HttpUtils.postJSONData(HttpAddress.InListSave, map, callBack, tag, activity);
    }

    //保养配件品牌
    public static void getByPartsBrand(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.GetByPartsBrand, map, callBack, tag, activity);
    }

    //保养配件列表
    public static void getByPartsList(String param, String brandCode, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        map.put("param", param);
        map.put("brandCode", brandCode);
        map.put("page", page);
        HttpUtils.patchData(HttpAddress.GetByPartsList, map, callBack, tag, activity);
    }

    //修改密码
    public static void changePwd(String loginName, String oldPwd, String newPwd, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("loginName", loginName);
        map.put("oldPwd", MD5.md5(oldPwd));
        map.put("newPwd", MD5.md5(newPwd));
        HttpUtils.patchData(HttpAddress.ChangePwd, map, callBack, tag, activity);
    }

    //获取分类
    public static void getKind(String pid, String type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("pid", pid);
        map.put("type", type);
        HttpUtils.patchData(HttpAddress.GetKind, map, callBack, tag, activity);
    }

    //根据车型和km数获取保养配件
    public static void getByPartsByKm(String carCode, String mileage , HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("carCode", carCode);
        map.put("mileage", mileage );
        map.put("companyId",MyUtils.getUser(activity).getCompanyId() );
        HttpUtils.patchData(HttpAddress.GetPartsByKm, map, callBack, tag, activity);
    }

    //获取所有的类型
    public static void getAllByKind(String carCode , HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("carCode", carCode);
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.GetAllByKind, map, callBack, tag, activity);
    }

    //获取可更换的列表
    public static void getChangeList(String carCode , String pid ,String isAll ,HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("carCode", carCode);
        map.put("pid", pid);
        map.put("isAll", isAll);
        map.put("companyId", MyUtils.getUser(activity).getCompanyId());
        HttpUtils.patchData(HttpAddress.ChangeCarPartsList, map, callBack, tag, activity);
    }

    //获取待结算的列表
    public static void getForPayList(int isAll , String technicianId ,int page  ,HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("isAll", isAll);
        map.put("technicianId", technicianId);
        map.put("page", page);
        HttpUtils.patchData(HttpAddress.GetForPayList, map, callBack, tag, activity);
    }


    //支付
    public static void payForOrder(PayEntity payEntity , HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", payEntity);
        HttpUtils.postPayJson(HttpAddress.PayForOrder, map, callBack, tag, activity);
    }

    //特殊采购保存
    public static void saveSpecialBuy(SpecialEntity specialEntity , HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", specialEntity);
        HttpUtils.postPayJson(HttpAddress.SaveSpecialBuy, map, callBack, tag, activity);
    }

    //工单流转
    public static void changeOrderTo(String id,String placeId,String technicianId, HandleDataCallBack callBack, int tag, Activity activity){
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("id", id);
        map.put("placeId", placeId);
        map.put("technicianId", technicianId);
        map.put("userId", MyUtils.getUser(activity).getId());
        HttpUtils.patchData(HttpAddress.ChangeOrderTo, map, callBack, tag, activity);
    }

    //出入库保存操作
    public static void saveOutOrInList(OutOrInEntity outOrInEntity, HandleDataCallBack callBack, int tag, Activity activity){
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("jsonString", outOrInEntity);
        HttpUtils.postJSONData(HttpAddress.SaveOutOrInList, map, callBack, tag, activity);
    }

}